#coding=utf-8  
import pymysql
conn = pymysql.connect(host='192.168.1.201', port=3306,user='szplat',passwd='szplat',db='szgasdb',charset='UTF8')
cur = conn.cursor()
#查询表中存在的数据
cur.execute("select * from t_sys_dict")
#ret1 = cur.fetchall()
#print(ret1)
#print("----------------------")
#ret2 = cur.fetchmany(3)
#print(ret2)
print("------------------------------")
#获取表中第一行数据
ret3= cur.fetchone()
print(ret3)